package cn.hz.pi.api;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

public class AddressUtil {

	public static Properties prop = new Properties();

	static {

		InputStream in = null;
		try {
			in = AddressUtil.class.getClassLoader().getResourceAsStream("attachment.properties");
			prop.load(new InputStreamReader(in, "UTF-8"));
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				if (null != in) {
					in.close();
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

	}

	public static String getProperty(String str) {
		return prop.getProperty(str);
	}

	public static String getPiServerSdkPort() {
		return prop.getProperty("PiSdkServerPort");
	}

	public static String getPiServerSdkIP() {
		return prop.getProperty("PiSdkServerHost");
	}

}
